From: Keir Fraser Date: Wed, 6 Apr 2011 14:52:50 +0000 (+0100) Subject: xentrace: Move register_cpu_notifier() call into boot-time init. X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=e15c160c0f6ee65e0160826d8a3987a65ccfa9ec;p=xen.git xentrace: Move register_cpu_notifier() call into boot-time init. We can't do it lazily from alloc_trace_bufs() as that gets called later if tracing is enabled later by dom0. Signed-off-by: Keir Fraser --- diff --git a/xen/common/trace.c b/xen/common/trace.c index 4225f0413f..373a3dc022 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -225,8 +225,6 @@ static int alloc_trace_bufs(unsigned int pages) t_buf_highwater = data_size >> 1; /* 50% high water */ opt_tbuf_size = pages; - register_cpu_notifier(&cpu_nfb); - printk("xentrace: initialised\n"); wmb(); /* above must be visible before tb_init_done flag set */ tb_init_done = 1; @@ -309,6 +307,8 @@ int trace_will_trace_event(u32 event) */ void __init init_trace_bufs(void) { + register_cpu_notifier(&cpu_nfb); + if ( opt_tbuf_size && alloc_trace_bufs(opt_tbuf_size) ) { printk(XENLOG_INFO "xentrace: allocation size %d failed, disabling\n",